// See LICENSE for license details.
#include <stdio.h>
#include <time.h>
#include <stdlib.h>
#include "hbird_sdk_soc.h"
#include "spi.h"
#include "led.h"

int main(void)
{
	int i=0;
	char charArray[] = {'L','y','h','R','i','s','c','-','v',};
	SPI_init();
	LED_init();
    printf("Spi test\r\n");
    printf("LYH'S RISC-V\r\n");
    while(1)
    {
    	CS_L;
    	delay_1ms(1);
    	for(i=0;i<9;i++)
    	SOFT_SPI_RW_MODE0(charArray[i]);
    	CS_H;
    	delay_1ms(100);
    	LED_Waterfull();
    }
    return 0;
}

